/*----------------------------------------------------------------------------*/
/* Copyright 2011 http://www.kmftech.com                                      */
/*                                                                            */
/* This file is part of kmftech.                                              */
/*                                                                            */
/* kmftech is free software: you can redistribute it and/or modify it under   */
/* the terms of the GNU General Public License as published by the Free       */
/* Software Foundation, version 2 of the License, or (at your option) any     */
/* later version.                                                             */
/*                                                                            */
/* kmftech is distributed in the hope that it will be useful, but WITHOUT ANY */
/* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS  */
/* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more      */
/* details.                                                                   */
/*                                                                            */
/* You should have received a copy of the GNU General Public License along    */
/* with kmftech. If not, see http://www.gnu.org/licenses/.                    */
/*----------------------------------------------------------------------------*/


/*----------------------------------------------------------------------------*/
/*---------------------------- DOCUMENT HISTORY ------------------------------*/
/* Ver: 1.0    Author: Karim Mansour                      Date: 30 April 2011 */
/* Ver: 1.1    Author: Karim Mansour                      Date: 07 June 2011  */
/* Ver: 1.2    Author: Karim Mansour                      Date: 08 June 2011  */
/* Ver: X.X    Author:                                    Date:               */
/*----------------------------------------------------------------------------*/
/*---------------------    DOCUMENT CHANGE HISTORY ---------------------------*/
/* Ver: 1.0    Change: Initial Version.                                       */
/* Ver: 1.1    Change: Added experimental code                                */
/* Ver: 1.2    Change: Removed experimental code, and disabled RTOS           */
/* Ver: X.X    Change:                                                        */
/*----------------------------------------------------------------------------*/


/*                           Needed Header Files                              */
#include "main.h"

/*                           Functions Prototypes                             */
void vd_sys_init(void);

/*                         Functions Implementation                           */

/*----------------------------------------------------------------------------*/
/*---------------------------- FUNCTION HEADER -------------------------------*/
/* Name       : main                                                          */
/* Description: The main function, the software starts from here              */
/* Input(s)   : Input  1: void                                                */
/* Output(s)  : Output 1: void                                                */
/* Author     : Karim Mansour                                                 */
/*----------------------------------------------------------------------------*/
int main(void)
{   
   /* Initialize the whole system */
   vd_sys_init();
   
   while(1)
	{
      vd_app_start();
	}
   
   /* Start the kmftech RTOS */
   //vd_rtos_start();

   return 0;
}

/*----------------------------------------------------------------------------*/
/*---------------------------- FUNCTION HEADER -------------------------------*/
/* Name       : sys_init                                                      */
/* Description: Initialize the whole system                                   */
/* Input(s)   : Input  1: void                                                */
/* Output(s)  : Output 1: void                                                */
/* Author     : Karim Mansour                                                 */
/*----------------------------------------------------------------------------*/
void vd_sys_init(void)
{
   /* Initialize kmftech RTOS */
   //vd_rtos_init();
   /* Initialize kmftech basic software layer ISR component */
   vd_bsc_isr_init();
   /* Initialize kmftech basic PWM */
   vd_bsc_pwm_init();
   /* Initialize kmftech basic UART */
   vd_bsc_uart_init();
}


/*-----------------------------End Of File------------------------------------*/
